int test(int number, int cm, int dc, int wn) {
    int mc = 0;
    if (wn > 2) {
        if (number > 2 || number > 2) {  // Simplified condition
            if (number > 0) {
                if (wn > 2 || wn > 2) {  // Simplified condition
                    mc = 2;
                } else {
                    mc = 5;
                }
            } else {
                mc = 100;
            }
        }
    } else {
        mc = 1;
    }

    int nnn = number * cm;
    int num_incr;
    if (cm <= 4) {
        num_incr = 4;
    } else {
        num_incr = cm;
    }

    int n_num_incr = nnn / num_incr;
    int nnn_left = dc * num_incr * (n_num_incr / 2 + n_num_incr % 2);
    int nnn_right = nnn - nnn_left;
    bool is_flag = nnn_right != 0;

    int cell;
    if (is_flag) {
        cell = 1;    } else {
        cell = 0;
    }

    return cell;
}